#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>

typedef int valuetype;

typedef struct QueueNode {
	valuetype val;
	struct QueueNode* next;
} QueueNode;

typedef struct Queue {
	int size;
	QueueNode* front;
	QueueNode* rear;
} Queue;

void Init(Queue* queue);

void Push(Queue* queue, valuetype val);
void Pop(Queue* queue);

valuetype Front(Queue* queue);
valuetype Rear(Queue* queue);

int Size(Queue* queue);
bool Empty(Queue* queue);
void Destroy(Queue* queue);